package com.ruoyi.business.mapper;

import java.util.List;

import com.ruoyi.business.domain.BusCustomer;
import com.ruoyi.business.vo.CustomerAddressVo;
import com.ruoyi.common.core.domain.model.LoginUser;
import org.apache.ibatis.annotations.Param;

/**
 * 客户增删改查Mapper接口
 *
 * @author powernode
 * @date 2021-12-28
 */
public interface BusCustomerMapper {
    /**
     * 查询客户增删改查
     *
     * @param id 客户增删改查主键
     * @return 客户增删改查
     */
    public BusCustomer selectBusCustomerById(Long id);

    /**
     * 查询客户增删改查列表
     *
     * @param busCustomer 客户增删改查
     * @return 客户增删改查集合
     */
    public List<BusCustomer> selectBusCustomerList(BusCustomer busCustomer);

    /**
     * 新增客户增删改查
     *
     * @param busCustomer 客户增删改查
     * @return 结果
     */
    public int insertBusCustomer(BusCustomer busCustomer);

    /**
     * 修改客户增删改查
     *
     * @param busCustomer 客户增删改查
     * @return 结果
     */
    public int updateBusCustomer(BusCustomer busCustomer);

    /**
     * 删除客户增删改查
     *
     * @param id 客户增删改查主键
     * @return 结果
     */
    public int deleteBusCustomerById(Long id);

    /**
     * 批量删除客户增删改查
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBusCustomerByIds(Long[] ids);

    /**
     * 分页查询客户的列表
     *
     * @param loginUser
     * @param busCustomer
     * @return
     */
    List<BusCustomer> selectCustomerPage(@Param("loginUser") LoginUser loginUser, @Param("busCustomer") BusCustomer busCustomer);

    /**
     * 删除客户
     * @param ids
     * @param loginUser
     * @return
     */
    int delCustomerByIds(@Param("ids") List<Long> ids, @Param("loginUser") LoginUser loginUser);

    BusCustomer selectByIdentity(String identity);

    List<CustomerAddressVo> selectCustomerAddressData();
}
